﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace myDocumentClustering.PreProcessing
{
    class StopWordFilter
    {
        static String[] stopWords;

        static StopWordFilter()
        {
            StringBuilder sb = new StringBuilder();
            sb.Append("about a above across after again against all almost alone along ");
            sb.Append("already also although always am among an and another any anybody ");
            sb.Append("0 1 2 3 4 5 6 7 8 9 ");
            sb.Append("anyone anything anywhere are area areas around as ask asked asking ");
            sb.Append("asks at away b back backed backing backs be became because become ");
            sb.Append("becomes been before began behind being beings best better between ");
            sb.Append("big both but by c came can cannot case cases certain certainly ");
            sb.Append("clear clearly come could d did differ different differently do ");
            sb.Append("does done down downed downing downs during e each early either ");
            sb.Append("end ended ending ends enough even evenly ever every everybody ");
            sb.Append("everyone everything everywhere f face faces fact facts far felt ");
            sb.Append("few find finds first for four from full fully further furthered ");
            sb.Append("furthering furthers g gave general generally get gets give given ");
            sb.Append("gives go going good goods got grateful great greater greatest group grouped ");
            sb.Append("grouping groups gt h had has have having he her here herself high ");
            sb.Append("higher highest him himself his how however i if important in ");
            sb.Append("interest interested interesting interests into is it its itself ");
            sb.Append("j just k keep keeps kind knew know known knows l large largely ");
            sb.Append("last later latest least less let lets like likely long longer longest lt");
            sb.Append("m made make making man many may me member members men might more ");
            sb.Append("most mostly mr mrs much must my myself n necessary need needed ");
            sb.Append("needing needs never new new newer newest next no nobody non noone ");
            sb.Append("not nothing now nowhere number numbers o of off often old older ");
            sb.Append("oldest on once one only open opened opening opens or order ordered ");
            sb.Append("ordering orders other others our out over p part parted parting ");
            sb.Append("parts per perhaps place places point pointed pointing points possible ");
            sb.Append("present presented presenting presents problem problems put puts q ");
            sb.Append("quite r rather really right right room rooms s said same saw say ");
            sb.Append("says second seconds see seem seemed seeming seems sees several shall ");
            sb.Append("she should show showed showing shows side sides since small smaller ");
            sb.Append("smallest so some somebody someone something somewhere state states ");
            sb.Append("still such sure t take taken than thank thanks that the their them then there ");
            sb.Append("therefore these they thing things think thinks this those though ");
            sb.Append("thought thoughts three through thus to today together too took toward ");
            sb.Append("turn turned turning turns two u under until up upon us use used uses ");
            sb.Append("v ve very w want wanted wanting wants was way ways we well wells went ");
            sb.Append("were what when where whether which while who whole whose why will ");
            sb.Append("with within without work worked working works would x y year years ");
            sb.Append("yet you young younger youngest your z yours");

            stopWords = sb.ToString().Split(' ');

        }
        public static Boolean IsStopWord(String word)
        {
            Boolean result = stopWords.Contains(word);
            return result;
        }
    }
}
